<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link href="css/common.css" rel="stylesheet" />
		<style>
			body{
				height:100%;
			}
			header{
				height:10%;
			}
			#main{
				text-align: center;
				height:90%;
			}
			.big-btn{
				width: 100%;
			    height: 100%;
			    font-size: 300%;
			}
		</style>
	</head>

	<body>
		<header>
		    <img class="logo" src="img/logo.png" />
			<div class="login-user">当前登录：<span id="login-user">护士</span>
				<a href="javascript:logout();">退出</a>
			</div>
		</header>
		<div id="main" class="mui-content">
<!--			<div class="mui-input-row">
		    	<input id="barcode" onblur="setFocus('barcode')" type="text" class="mui-input-clear" placeholder="等待扫码..." autofocus="autofocus">
		    </div>
			<div class="mui-input-row mui-radio mui-left">
				<label>采血确认</label>
				<input name="radio" type="radio" value="1" checked>
			</div>
			<div class="mui-input-row mui-radio mui-left">
				<label>撤销确认</label>
				<input name="radio" type="radio" value="2">
			</div>-->
			
		    <div class="mui-row" style="height:100%;">
		        <div class="mui-col-sm-6" style="height:100%;">
		            <button onclick="toIndex(1)" type="button" class="mui-btn big-btn">采血确认</button>
		        </div>
		        <div class="mui-col-sm-6" style="height:100%;">
		            <button onclick="toIndex(2)" type="button" class="mui-btn big-btn">撤销确认</button>
		        </div>
		    </div>
		</div>
		<script src="js/mui.min.js"></script>
		<script src="js/common.js"></script>
		<script type="text/javascript">			
			mui.plusReady(function() {
				var self = plus.webview.currentWebview();
				plus.storage.setItem('userCode', self.UserCode);
				plus.storage.setItem('userName', self.UserName);
				plus.storage.setItem('positionCode', self.PositionCode);
				plus.storage.setItem('positionName', self.PositionName);
				document.getElementById('login-user').innerHTML = self.UserName + '（'+self.UserCode+'）';
			});
			
			function toIndex(type){
				mui.openWindow({
					url: 'index.html',
					extras:{
						type:type
					}
				});
			}
//			document.getElementById('barcode').addEventListener('change',function(){
//				scan(this.value);
//			});
//			function scan(barcode){
//				document.getElementById('barcode').value='';
//				mui.openWindow({
//						url: 'index.html',
//						extras:{
//							barcode:barcode,
//							type:document.querySelector('input[name="radio"]:checked').value
//						}
//				});
//			}
		</script>
	</body>

</html>